package com.nit.lab.service.ship.Impl;

import com.nit.lab.dto.ship.ShipDTO;
import com.nit.lab.dto.ship.ShipTrackDTO;
import com.nit.lab.dto.ship.WorkDTO;
import com.nit.lab.dto.utils.TableReqDTO;
import com.nit.lab.dto.utils.TableRspDTO;
import com.nit.lab.entity.ship.ShipTrackEntity;

import com.nit.lab.mapper.ship.ShipTrackMapper;
import com.nit.lab.service.ship.ShipTrackService;
import ma.glasnost.orika.MapperFactory;
import ma.glasnost.orika.impl.DefaultMapperFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class ShipTrackImpl implements ShipTrackService {

    @Autowired(required = false)
    private ShipTrackMapper shipTrackMapper;

    @Override
    public List<ShipTrackDTO> query(String mmsiNumber) throws Exception {
        return shipTrackMapper.query(mmsiNumber);
    }

    @Override
    public List<ShipTrackDTO> list4SpecificShip(String mmsiNumber,String beginTimeStamp,String endTimeStamp) throws Exception {
        return shipTrackMapper.list4SpecificShip(mmsiNumber,beginTimeStamp,endTimeStamp);
    }

    @Override
    public ShipTrackDTO queryMinTime(String mmsiNumber,String portChinese) throws Exception {
        return shipTrackMapper.queryShipMinTime(mmsiNumber,portChinese);
    }

    @Override
    public List<ShipTrackDTO> queryLaterShip(String mmsiNumber,Date arriveTime) throws Exception {
        return shipTrackMapper.queryLaterShip(mmsiNumber,arriveTime);
    }



}
